<template>
  <div class="search-suggestion">
    <van-cell title="黑马程序员..." icon="search"></van-cell>
    <van-cell title="黑马程序员..." icon="search"></van-cell>
    <van-cell title="黑马程序员..." icon="search"></van-cell>
    <van-cell title="黑马程序员..." icon="search"></van-cell>
    <van-cell title="黑马程序员..." icon="search"></van-cell>
  </div>
</template>

<script>
export default {
  name: 'SearchSuggestion',
  props:{
    // 父组件的搜索内容
    searchText:{
      type:String,
      required:true
    }
  },
  watch:{
    // 监听输入内容的变化
    searchText:{
      handler(newval){
        console.log(newval);
      },
      immediate:true   // 第一次就执行以下
    }
  },
  data () {
    return {}
  },
  computed: {},
  methods: {}
}
</script>

<style scoped lang="less"></style>
